-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(connector): Cleanup base models and views according to SIP-92 #24773
chore(connector): Cleanup base models and views according to SIP-92 #24773
Conversation
a27a2a2
to
42e2c6c
Compare
Codecov Report
@@ Coverage Diff @@
## master #24773 +/- ##
==========================================
+ Coverage 67.23% 68.92% +1.69%
==========================================
Files 1902 1900 -2
Lines 73939 73835 -104
Branches 8176 8176
==========================================
+ Hits 49713 50894 +1181
+ Misses 22113 20828 -1285
Partials 2113 2113
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 93 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
42e2c6c
to
9dde751
Compare
9dde751
to
c39eefc
Compare
@eschutho and @michael-s-molina I was wondering whether this PR would be a good candidate to have merged prior to the 3.1 cut given it refactors a non-trivial number of files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@john-bodley This change looks really great!
This is already merged, so I'm late to respond, but in theory, I would say it would be good to merge refactors right after a minor/major release has gone out, so that the next release starts hardening on top of the refactor. But you're still going to be impacted for any patch releases. There's no way to make this perfect, of course. |
@eschutho it's likely somewhat of a tough balance right? If you do this right after a major/minor release then it gives time for the |
SUMMARY
This PR is a partial step towards SIP-92 Proposal for restructuring the Python code base where the
superset.connectors
submodule represents a bygone error of Superset when we supported both the Druid NoSQL and SQLAlchemy database engine connectors. Note long term thesuperset.connectors
submodule should be abandoned with the models, views, and utilities moved elsewhere, but I thought it would be prudent to make said change in smaller bites.Many of the base models and views are superfluous as they're only extended by one and only class. This PR:
BaseColumn
andBaseMetric
classes into theTableColumn
andSqlMetric
classes respectively.DatasourceModelView
class into theTableModelView
class.superset.connectors.base.models.BaseDatasource
tosuperset.connectors.sqla.models.BaseDatasource
.Ideally I would love to deprecate the
BaseDatasource
however at this stage I'm not brave enough. Currently (in addition toSqlaTable
class) theAnnotationDatasource
class is derived from it and thus sunsetting it is somewhat problematic. We maybe need to remove theAnnotationDatasource
class somewhat like theQuery
class which behaves somewhat like a datasource/dataset.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION